<template>
  <div>
    <h3 align="center">软件2351学生名单</h3>
    <!-- <table class="table table table-striped table-hover">
      <tr>
        <td>学号</td>
        <td>姓名</td>
        <td>JavaScript</td>
        <td>java</td>
        <td>Python</td>
        <td>数据结构</td>
        <td>线性代数</td>
        <td>总分</td>
      </tr>
      <tbody></tbody>
      <tr v-for="(stu, index) in students" :key="index">
        <td>{{ stu.stuNo }}</td>
        <td>{{ stu.name }}</td>
        <td>{{ stu.js }}</td>
        <td>{{ stu.java }}</td>
        <td>{{ stu.python }}</td>
        <td>{{ stu.ds }}</td>
        <td>{{ stu.la }}</td>
        <td>{{ stu.js + stu.java + stu.python + stu.ds + stu.la }}</td>
      </tr>
    </table> -->
    <el-table :data="students" height="750" style="width: 100%">
      <el-table-column prop="stuNo" label="学号" width="180" />
      <el-table-column prop="name" label="姓名" width="180" />
      <el-table-column prop="js" label="JavaScript程序设计" />
      <el-table-column prop="java" label="Java基础" />
      <el-table-column prop="python" label="Python数据采集" />
      <el-table-column prop="ds" label="数据结构" />
      <el-table-column prop="la" label="线性代数" />
      <el-table-column label="总分" />
    </el-table>
  </div>
</template>

<script>
import students from '@/api/students'
export default {
  data() {
    return {
      students: students,
    }
  },
  //   mounted() {
  //     console.log(this.students)
  //   },
}
</script>

<style lang="scss" scoped></style>
